package recursion;


//用递归求5的阶乘
public class Test2 {
    public static void main(String[] args) {
        System.out.println(getSum(1));
    }

    public static int getSum(int number){
        if(number == 5){
            return number;
        }
        int sum = number * getSum(number+1);
        return sum;
    }
}
